package com.slipper.system.codeless.controller;

import com.slipper.system.codeless.bo.DatabaseBO;
import com.slipper.system.codeless.service.DatabaseService;
import com.slipper.util.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 数据库信息表
 */
@RestController
@RequestMapping("/system/database")
public class DatabaseController {
    @Resource
    private DatabaseService databaseService;

    @PostMapping(value = "/queryBy")
    public String queryBy(@RequestBody DatabaseBO bo) {
        return ResultUtil.successResult(databaseService.queryBy(bo.getId()));
    }

    @PostMapping(value = "/queryPage")
    public String queryPage(@RequestBody DatabaseBO bo) {
        return ResultUtil.successResult(databaseService.queryPage(bo));
    }
}
